package com.felix.pattern.abstractfactory;

/**
 * FactoryProducer
 *
 * @author xuejinhua
 * @date 2019/1/14 18:03
 */
public class FactoryProducer {

    public static AbstractFactory getFactory(String choice){
        if(choice.equalsIgnoreCase("SHAPE")){
            return new ShapeFactory();
        } else if(choice.equalsIgnoreCase("COLOR")){
            return new ColorFactory();
        }
        return null;
    }
}
